package com.example.bookmall.entity;
import com.baomidou.mybatisplus.annotation.*;
import lombok.Data;
import lombok.experimental.Accessors;

import java.time.LocalDateTime;

@Data
@TableName("cart")

@Accessors(chain = true)
//购物车
public class Cart {
    @TableId(type = IdType.AUTO)
    private Integer cartId;

    private Integer userId;

    private Integer bookId;

    //商品数量
    private Integer quantity;

    //添加时间
    @TableField(fill = FieldFill.INSERT)
    private LocalDateTime addTime;

    @TableField(fill = FieldFill.UPDATE)
    private LocalDateTime updateTime;
}